/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template
 */
package org.sbbs.base.jpa.dao;

import java.io.Serializable;
import java.util.List;
import org.sbbs.base.jpa.entity.BaseTreeEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.NoRepositoryBean;

/**
 *
 * @author jenkins
 */
//@Component
@NoRepositoryBean
public interface BaseTreeRepo<B extends BaseTreeEntity, Id extends Serializable>  extends BaseRepo<B, Id> {
    
    public List<B> findByPidOrderBySort(Long pid);
    
    @Query("select u.id from #{#entityName}  u where u.pid = ?1 order by u.sort")
    public List<Long> findIdByPidOrderBySort(Long pid);
    

}
